package cn.iocoder.yudao.module.wengfu.dal.mysql.approval;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wengfu.dal.dataobject.approval.SampleApprovalInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wengfu.controller.admin.approval.vo.*;

/**
 * 样品审批 Mapper
 *
 * @author yzs
 */
@Mapper
public interface SampleApprovalInfoMapper extends BaseMapperX<SampleApprovalInfoDO> {

    default PageResult<SampleApprovalInfoDO> selectPage(SampleApprovalInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SampleApprovalInfoDO>()
                .eqIfPresent(SampleApprovalInfoDO::getSampleId, reqVO.getSampleId())
                .eqIfPresent(SampleApprovalInfoDO::getTestId, reqVO.getTestId())
                .orderByDesc(SampleApprovalInfoDO::getId));
    }

}